package com.pattern.strategy.strategypattern;
/*
* 玩家总伤害设定
* */
public abstract class GameplayerHurt {
    public abstract String getname();//怪物名称

    //玩家伤害
    protected abstract double queryHurt();

    //伤害计算
    public hurtState pay(double amount){
        if(queryHurt() < amount){
            return new hurtState(500,"失败","伤害不足");
        }else{
            return new hurtState(200,"刷怪成功","怪物血量：" + amount+"当前总伤害："+queryHurt());
        }
    }
}
